#!/usr/bin/env python
#coding=utf8

class Athlete:
    def __init__(self,the_txt):
        try:
            with open(the_txt) as the_file:
                tmp=the_file.readline().strip().split(",")
        except IOError as err:
            print("file is missing"+str(err))
        self.name=tmp.pop(0)
        self.dob=tmp.pop(0)
        self.times=tmp

    def add_time(self,the_string):
        self.times.append(the_string)

    def add_times(self,the_list):
        self.times.extend(the_list)

    def __sanitize(self,the_string):
         if "-" in the_string:
             return the_string.replace("-",".")
         elif ":" in the_string:
             return the_string.replace(":",".")
         else:
             return the_string

    def top3(self):
        t=sorted(set([self.__sanitize(the_string) for the_string in self.times]))[0:3]
        print(self.name + " 3 fast time is " +str(t))